package labs.laba_03;

import java.math.BigDecimal;

import android.graphics.Canvas;
import android.graphics.Paint;

public class FCircle extends Figure {

	public FCircle(float center_x, float center_y, Figure parent, FigureTypes ft){
		super(center_x, center_y, parent, ft);
	}
	public float getRadius() {
		return BigDecimal.valueOf(this.width/2).setScale(2).floatValue();
	}
	@Override
	public float getOuterRadius() {
		return getRadius();
	}
	@Override
	public PrimitiveCircle getPrimitive() {
		return new PrimitiveCircle(this.getCenter(), this.getRadius());
	}
	@Override
	public void draw(Canvas canvas) {
		Paint mPaint = new Paint();
		mPaint.setARGB(255, 100, 200, 100);
		canvas.drawCircle(this.getCenter().getX(), this.getCenter().getY(), this.getRadius(), mPaint);		
	}
}
